<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Dashboard Template for Bootstrap</title>
    <!-- Bootstrap core CSS -->
    <link th:href="@{/webjars/bootstrap/4.0.0/dist/css/bootstrap.min.css}" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link th:href="@{/asserts/css/dashboard.css}" rel="stylesheet">
    <style type="text/css">
        /* Chart.js */

        @-webkit-keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        @keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        .chartjs-render-monitor {
            -webkit-animation: chartjs-render-animation 0.001s;
            animation: chartjs-render-animation 0.001s;
        }
    </style>
</head>

<body>
<!--头部导航栏-->
<div th:replace="~{common/commonFragment::nav-top}"></div><!--用片段替换掉当前的div-->

<div class="container-fluid">
    <div class="row">
        <!--左侧导航栏-->
        <div th:replace="~{common/commonFragment::nav-left(item='dashboard')}"></div><!--用左侧片段替换当前的div-->

        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
            <h2>添加员工</h2>
            <!--<form th:action="@{/emp/addEmp}" th:method="post">
                <input class="form-control form-control-lg" type="text" name="ename" placeholder="姓名">
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="radio" name="sex" id="inlineRadio1" value="男">
                    <label class="form-check-label" for="inlineRadio1">男</label>
                </div>
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="radio" name="sex" id="inlineRadio2" value="女">
                    <label class="form-check-label" for="inlineRadio2">女</label>
                </div>
                <input class="form-control form-control-lg" type="text" name="birthday" placeholder="出生日期">
                <input class="form-control form-control-lg" type="text" name="salary" placeholder="薪水">
                <select class="form-control form-control-lg" name="deptno">
                   &lt;!&ndash; <option>请选择部门</option>&ndash;&gt;
                    <option  th:each="dept:${deptList}" th:text="${dept.getDname()}" th:value="${dept.getDeptno()}">
                    </option>
                </select>
                <input class="form-control form-control-lg" type="text" name="estatus" placeholder="状态">
                <button type="submit" class="btn btn-primary">添加</button>
            </form>-->
            <form th:action="@{/emp}" th:method="post">
                <!--姓名-->
                <div class="form-group">
                    <label for="exampleFormControlInput1">姓名</label>
                    <input name="ename" class="form-control form-control-lg" id="exampleFormControlInput1" type="text"  placeholder="姓名">
                </div>
                <!--性别-->
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="radio" name="sex" id="inlineRadio1" value="男" checked>
                    <label class="form-check-label" for="inlineRadio1">男</label>
                </div>
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="radio" name="sex" id="inlineRadio2" value="女">
                    <label class="form-check-label" for="inlineRadio2">女</label>
                </div>
                <!--生日-->
                <div class="form-group">
                    <label for="date">生日</label>
                    <input name="birthday" type="date" class="form-control" id="date" >
                </div>
                <!--薪资-->
                <div class="form-group">
                    <label for="exampleFormControlInput1Salary">薪水</label>
                    <input name="salary" class="form-control form-control-lg" id="exampleFormControlInput1Salary" type="text" placeholder="薪资">
                </div>
                <div class="form-group">
                    <label for="exampleFormControlSelect1">请选择部门</label>
                    <select name="deptno" class="form-control" id="exampleFormControlSelect1">
                       <option th:each="dept:${deptList}"
                               th:text="${dept.getDname()}"
                               th:value="${dept.getDeptno()}">
                       </option>
                    </select>
                </div>
                <input type="submit" class="btn btn-primary" th:value="添加">
            </form>
        </main>

    </div>
</div>

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" th:src="@{/asserts/js/jquery-3.2.1.slim.min.js}"></script>
<script type="text/javascript" th:src="@{/asserts/js/popper.min.js}" ></script>
<script type="text/javascript" th:src="@{/webjars/bootstrap/4.0.0/dist/css/bootstrap.min.css}" ></script>

<!-- Icons -->
<script type="text/javascript" th:src="@{/asserts/js/feather.min.js}"></script>
<script>
    feather.replace()
</script>

<!-- Graphs -->
<script type="text/javascript" th:src="@{/asserts/js/Chart.min.js}"></script>
<script>
    var ctx = document.getElementById("myChart");
    var myChart = new Chart(ctx, {
        type: 'line',
        data: {
            labels: ["[[#{empsys.sunday}]]", "[[#{empsys.monday}]]", "[[#{empsys.tuesday}]]", "[[#{empsys.wednesday}]]",
                "[[#{empsys.thursday}]]", "[[#{empsys.friday}]]", "[[#{empsys.saturday}]]"],
            datasets: [{
                data: [15339, 21345, 18483, 24003, 23489, 24092, 12034],
                lineTension: 0,
                backgroundColor: 'transparent',
                borderColor: '#007bff',
                borderWidth: 4,
                pointBackgroundColor: '#007bff'
            }]
        },
        options: {
            scales: {
                yAxes: [{
                    ticks: {
                        beginAtZero: false
                    }
                }]
            },
            legend: {
                display: false,
            }
        }
    });
</script>

</body>

</html>